<%--
  Created by IntelliJ IDEA.
  User: caojian
  Date: 2017/3/10
  Time: 下午5:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>忘记密码</title>
    <jsp:include page="common/common_css.jsp"/>
</head>
<body>

<div class="ui middle aligned center aligned grid">
    <div class="column">
        <h2 class="ui teal header">
            <div class="content">
                忘记密码
            </div>
        </h2>
        <jsp:include page="common/message.jsp"/>
        <form class="ui large form" action="${pageContext.request.contextPath}/user/forgetPsd" method="post">
            <div class="ui stacked segment">
                <div class="field">
                    <div class="ui left icon input">
                        <i class="user icon"></i>
                        <input type="text" name="email" placeholder="在这里输入邮箱">
                    </div>
                </div>
                <div class="ui fluid large teal submit button">确定</div>
                <div class="ui error message"></div>
            </div>
        </form>
        <div style="text-align: right">
            <a href="${pageContext.request.contextPath}/login">返回登录</a>
        </div>
    </div>
</div>

<jsp:include page="common/common_js.jsp"/>
<script>
    $(function () {
        $('.ui.form')
            .form({
                fields: {
                    email: {
                        identifier: 'email',
                        rules: [
                            {
                                type: 'empty',
                                prompt: '请输入邮箱。'
                            },
                            {
                                type: 'email',
                                prompt: '请输入有效邮箱。'
                            }
                        ]
                    }
                }
            })
        ;

    });
</script>
</body>
</html>
